//
//  ThirdViewController.m
//  UI02作业
//
//  Created by dllo on 16/7/18.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ThirdViewController.h"
#import "FirstViewController.h"
#import "FourViewController.h"
#import "AccountView.h"
@interface ThirdViewController ()

@end

@implementation ThirdViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(200, 420, 100, 40);
    //    button.backgroundColor = [UIColor redColor];
    [button addTarget:self action:@selector(buttonClicked) forControlEvents:UIControlEventTouchUpInside];
    [button setTitleColor:[UIColor greenColor] forState:UIControlStateNormal];
    [self.view addSubview:button];
    [button setTitle:@"点击这里" forState:UIControlStateNormal];
    
    UIButton *button1 = [UIButton buttonWithType:UIButtonTypeCustom];
    //    button1.backgroundColor = [UIColor greenColor];
    [button1 setTitle:@"返回" forState:UIControlStateNormal];
    [button1 setTitleColor:[UIColor greenColor] forState:UIControlStateNormal];
    button1.frame = CGRectMake(20, 20, 50, 40);
    [self.view addSubview:button1];
    [button1 addTarget:self action:@selector(button1Clicked) forControlEvents:UIControlEventTouchUpInside];
    
    
    
    AccountView *accountView = [[AccountView alloc] initWithFrame:CGRectMake(10,250, 350, 80)];
    
    accountView.layer.cornerRadius = 5;
    accountView.layer.masksToBounds = YES;
    [self.view addSubview:accountView];
    
    UILabel *label = [[UILabel alloc] init];
    label.frame = CGRectMake(130, 50, 100, 130);
    label.font = [UIFont systemFontOfSize:25];
    label.text = @"验证手机";
    label.textColor = [UIColor blackColor];
    [self.view addSubview:label];
    
    UIButton *button2 = [UIButton buttonWithType:UIButtonTypeCustom];
    button2.frame = CGRectMake(40, 370, 300, 40);
    button2.backgroundColor = [UIColor greenColor];
    [button2 setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [button2 setTitle:@"下一步" forState:UIControlStateNormal];
    [self.view addSubview:button2];
    
    UILabel *label2 = [[UILabel alloc] init];
    label2.frame = CGRectMake(40, 420, 250, 40);
    label2.text = @"邮箱用户找回密码， 请";
    label2.textColor = [UIColor blackColor];
    label2.alpha = 0.6;
    [self.view addSubview:label2];
}

- (void)button1Clicked
{
    
    [self dismissViewControllerAnimated:YES completion:nil];
}


- (void)buttonClicked
{
    FourViewController *fourViewController = [[FourViewController alloc] init];
    fourViewController.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
    [self presentViewController:fourViewController animated:YES completion:nil];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
